package cn.tedu._04mybatis.mapper;

import cn.tedu._04mybatis.pojo.entity.Weibo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface WeiboMapper {
    @Insert("INSERT INTO weibo(content,created,user_id) VALUES  (#{content},#{created},#{user_id})")
    int insertWeibo(Weibo weibo);


    @Delete("DELETE FROM weibo WHERE id = #{weiboId}")
    int deleteWeibo(Weibo weiboId);

    @Select("SELECT id,content,created,user_id FROM weibo WHERE id=#{weiboId}")
    Weibo selectWeiboById(long weiboId);


   @Select("SELECT id,content,created,user_id FROM weibo")
    List<Weibo> selectWeibo();

   @Select("SELECT ")
    List<Weibo> selectAllWeibo();









}